VERSION 5.00
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "tabctl32.ocx"
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "richtx32.ocx"
Begin VB.Form frmMain 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Steel Warrior Database - Created by GodSentDeath and ScriptWisdom"
   ClientHeight    =   7575
   ClientLeft      =   75
   ClientTop       =   435
   ClientWidth     =   8535
   Icon            =   "frmMain.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   505
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   569
   StartUpPosition =   2  'CenterScreen
   Begin VB.PictureBox picBigSprites 
      Appearance      =   0  'Flat
      AutoRedraw      =   -1  'True
      AutoSize        =   -1  'True
      BackColor       =   &H80000005&
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   1935
      Left            =   7800
      ScaleHeight     =   1935
      ScaleWidth      =   2295
      TabIndex        =   69
      Top             =   8520
      Visible         =   0   'False
      Width           =   2295
   End
   Begin VB.PictureBox picPic 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   480
      Left            =   6480
      ScaleHeight     =   32
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   32
      TabIndex        =   68
      Top             =   960
      Width           =   480
   End
   Begin VB.PictureBox picPic2 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   480
      Left            =   9120
      ScaleHeight     =   32
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   32
      TabIndex        =   66
      Top             =   7560
      Width           =   480
   End
   Begin VB.PictureBox picItems 
      Appearance      =   0  'Flat
      AutoRedraw      =   -1  'True
      AutoSize        =   -1  'True
      BackColor       =   &H80000005&
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   1935
      Left            =   8520
      ScaleHeight     =   1935
      ScaleWidth      =   2295
      TabIndex        =   65
      Top             =   8280
      Visible         =   0   'False
      Width           =   2295
   End
   Begin VB.PictureBox picSprites 
      Appearance      =   0  'Flat
      AutoRedraw      =   -1  'True
      AutoSize        =   -1  'True
      BackColor       =   &H80000005&
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   1935
      Left            =   8880
      ScaleHeight     =   1935
      ScaleWidth      =   2295
      TabIndex        =   64
      Top             =   7920
      Visible         =   0   'False
      Width           =   2295
   End
   Begin VB.Frame Frame1 
      Caption         =   "Status"
      Height          =   375
      Left            =   120
      TabIndex        =   54
      Top             =   7080
      Width           =   8295
      Begin VB.Label lblStatus 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "Status"
         Height          =   195
         Left            =   0
         TabIndex        =   55
         Top             =   120
         Width           =   8280
      End
   End
   Begin TabDlg.SSTab SSTab1 
      Height          =   4215
      Left            =   120
      TabIndex        =   21
      Top             =   2760
      Width           =   8295
      _ExtentX        =   14631
      _ExtentY        =   7435
      _Version        =   393216
      Tabs            =   4
      TabsPerRow      =   4
      TabHeight       =   520
      TabCaption(0)   =   "NPCs"
      TabPicture(0)   =   "frmMain.frx":014A
      Tab(0).ControlEnabled=   -1  'True
      Tab(0).Control(0)=   "Frame2(0)"
      Tab(0).Control(0).Enabled=   0   'False
      Tab(0).ControlCount=   1
      TabCaption(1)   =   "Items"
      TabPicture(1)   =   "frmMain.frx":0166
      Tab(1).ControlEnabled=   0   'False
      Tab(1).Control(0)=   "Frame2(1)"
      Tab(1).ControlCount=   1
      TabCaption(2)   =   "Shops"
      TabPicture(2)   =   "frmMain.frx":0182
      Tab(2).ControlEnabled=   0   'False
      Tab(2).Control(0)=   "Frame2(2)"
      Tab(2).ControlCount=   1
      TabCaption(3)   =   "Spells"
      TabPicture(3)   =   "frmMain.frx":019E
      Tab(3).ControlEnabled=   0   'False
      Tab(3).Control(0)=   "Frame2(3)"
      Tab(3).ControlCount=   1
      Begin VB.Frame Frame2 
         Caption         =   "Config"
         Height          =   3735
         Index           =   3
         Left            =   -74880
         TabIndex        =   42
         Top             =   360
         Width           =   8055
         Begin VB.Frame Frame3 
            Caption         =   "HTML Code"
            Height          =   3135
            Index           =   3
            Left            =   120
            TabIndex        =   44
            Top             =   480
            Width           =   7815
            Begin VB.CommandButton Command3 
               Caption         =   "Save"
               Height          =   255
               Index           =   3
               Left            =   6480
               TabIndex        =   53
               Top             =   2760
               Width           =   1215
            End
            Begin VB.CommandButton Command2 
               Caption         =   "Preview"
               Height          =   255
               Index           =   3
               Left            =   5280
               TabIndex        =   52
               Top             =   2760
               Width           =   1215
            End
            Begin VB.CommandButton Command4 
               Caption         =   "Create Table"
               Height          =   255
               Index           =   3
               Left            =   4080
               TabIndex        =   45
               Top             =   2760
               Width           =   1215
            End
            Begin RichTextLib.RichTextBox txtHTML2 
               Height          =   2415
               Index           =   3
               Left            =   120
               TabIndex        =   73
               Top             =   240
               Width           =   7575
               _ExtentX        =   13361
               _ExtentY        =   4260
               _Version        =   393217
               Enabled         =   -1  'True
               ScrollBars      =   2
               TextRTF         =   $"frmMain.frx":01BA
            End
            Begin VB.Label Label11 
               AutoSize        =   -1  'True
               BackStyle       =   0  'Transparent
               Caption         =   "Hit Ctrl+A To Select All"
               Height          =   195
               Index           =   3
               Left            =   120
               TabIndex        =   46
               Top             =   2760
               Width           =   1605
            End
         End
         Begin VB.TextBox txtFileName 
            Height          =   285
            Index           =   3
            Left            =   1920
            TabIndex        =   43
            Text            =   "Spells.htm"
            Top             =   240
            Width           =   1695
         End
         Begin VB.Label Label3 
            AutoSize        =   -1  'True
            BackStyle       =   0  'Transparent
            Caption         =   "Filename With Extension:"
            Height          =   195
            Index           =   3
            Left            =   120
            TabIndex        =   47
            Top             =   240
            Width           =   1785
         End
      End
      Begin VB.Frame Frame2 
         Caption         =   "Config"
         Height          =   3735
         Index           =   2
         Left            =   -74880
         TabIndex        =   36
         Top             =   360
         Width           =   8055
         Begin VB.CheckBox chkMapNum 
            Caption         =   "Map #"
            Enabled         =   0   'False
            Height          =   255
            Left            =   4680
            TabIndex        =   61
            Top             =   240
            Value           =   1  'Checked
            Width           =   855
         End
         Begin VB.CheckBox chkLocation 
            Caption         =   "Location"
            Height          =   255
            Left            =   3720
            TabIndex        =   60
            Top             =   240
            Width           =   975
         End
         Begin VB.Frame Frame3 
            Caption         =   "HTML Code"
            Height          =   3135
            Index           =   2
            Left            =   120
            TabIndex        =   38
            Top             =   480
            Width           =   7815
            Begin VB.CommandButton Command3 
               Caption         =   "Save"
               Height          =   255
               Index           =   2
               Left            =   6480
               TabIndex        =   51
               Top             =   2760
               Width           =   1215
            End
            Begin VB.CommandButton Command2 
               Caption         =   "Preview"
               Height          =   255
               Index           =   2
               Left            =   5280
               TabIndex        =   50
               Top             =   2760
               Width           =   1215
            End
            Begin VB.CommandButton Command4 
               Caption         =   "Create Table"
               Height          =   255
               Index           =   2
               Left            =   4080
               TabIndex        =   39
               Top             =   2760
               Width           =   1215
            End
            Begin RichTextLib.RichTextBox txtHTML2 
               Height          =   2415
               Index           =   2
               Left            =   120
               TabIndex        =   72
               Top             =   240
               Width           =   7575
               _ExtentX        =   13361
               _ExtentY        =   4260
               _Version        =   393217
               Enabled         =   -1  'True
               ScrollBars      =   2
               TextRTF         =   $"frmMain.frx":023C
            End
            Begin VB.Label Label11 
               AutoSize        =   -1  'True
               BackStyle       =   0  'Transparent
               Caption         =   "Hit Ctrl+A To Select All"
               Height          =   195
               Index           =   2
               Left            =   120
               TabIndex        =   40
               Top             =   2760
               Width           =   1605
            End
         End
         Begin VB.TextBox txtFileName 
            Height          =   285
            Index           =   2
            Left            =   1920
            TabIndex        =   37
            Text            =   "Shops.htm"
            Top             =   240
            Width           =   1695
         End
         Begin VB.Label Label3 
            AutoSize        =   -1  'True
            BackStyle       =   0  'Transparent
            Caption         =   "Filename With Extension:"
            Height          =   195
            Index           =   2
            Left            =   120
            TabIndex        =   41
            Top             =   240
            Width           =   1785
         End
      End
      Begin VB.Frame Frame2 
         Caption         =   "Config"
         Height          =   3735
         Index           =   1
         Left            =   -74880
         TabIndex        =   30
         Top             =   360
         Width           =   8055
         Begin VB.CheckBox chkItemPicture 
            Caption         =   "Picture"
            Height          =   255
            Left            =   6480
            TabIndex        =   63
            Top             =   240
            Width           =   855
         End
         Begin VB.CheckBox chkIShopLocation 
            Caption         =   "Shop Location"
            Height          =   255
            Left            =   5040
            TabIndex        =   58
            Top             =   240
            Width           =   1335
         End
         Begin VB.CheckBox chkINPCLocation 
            Caption         =   "NPC Location"
            Height          =   255
            Left            =   3720
            TabIndex        =   57
            Top             =   240
            Width           =   1335
         End
         Begin VB.Frame Frame3 
            Caption         =   "HTML Code"
            Height          =   3135
            Index           =   1
            Left            =   120
            TabIndex        =   32
            Top             =   480
            Width           =   7815
            Begin VB.CommandButton Command3 
               Caption         =   "Save"
               Height          =   255
               Index           =   1
               Left            =   6480
               TabIndex        =   49
               Top             =   2760
               Width           =   1215
            End
            Begin VB.CommandButton Command2 
               Caption         =   "Preview"
               Height          =   255
               Index           =   1
               Left            =   5280
               TabIndex        =   48
               Top             =   2760
               Width           =   1215
            End
            Begin VB.CommandButton Command4 
               Caption         =   "Create Table"
               Height          =   255
               Index           =   1
               Left            =   4080
               TabIndex        =   33
               Top             =   2760
               Width           =   1215
            End
            Begin RichTextLib.RichTextBox txtHTML2 
               Height          =   2415
               Index           =   1
               Left            =   120
               TabIndex        =   71
               Top             =   240
               Width           =   7575
               _ExtentX        =   13361
               _ExtentY        =   4260
               _Version        =   393217
               Enabled         =   -1  'True
               ScrollBars      =   2
               TextRTF         =   $"frmMain.frx":02BE
            End
            Begin VB.Label Label11 
               AutoSize        =   -1  'True
               BackStyle       =   0  'Transparent
               Caption         =   "Hit Ctrl+A To Select All"
               Height          =   195
               Index           =   1
               Left            =   120
               TabIndex        =   34
               Top             =   2760
               Width           =   1605
            End
         End
         Begin VB.TextBox txtFileName 
            Height          =   285
            Index           =   1
            Left            =   1920
            TabIndex        =   31
            Text            =   "Items.htm"
            Top             =   240
            Width           =   1695
         End
         Begin VB.Label Label3 
            AutoSize        =   -1  'True
            BackStyle       =   0  'Transparent
            Caption         =   "Filename With Extension:"
            Height          =   195
            Index           =   1
            Left            =   120
            TabIndex        =   35
            Top             =   240
            Width           =   1785
         End
      End
      Begin VB.Frame Frame2 
         Caption         =   "Config"
         Height          =   3735
         Index           =   0
         Left            =   120
         TabIndex        =   22
         Top             =   360
         Width           =   8055
         Begin VB.CheckBox chkNPCPicture 
            Caption         =   "Picture"
            Height          =   255
            Left            =   4680
            TabIndex        =   62
            Top             =   240
            Width           =   855
         End
         Begin VB.CheckBox chkNpcLocation 
            Caption         =   "Location"
            Height          =   255
            Left            =   3720
            TabIndex        =   59
            Top             =   240
            Width           =   975
         End
         Begin VB.TextBox txtFileName 
            Height          =   285
            Index           =   0
            Left            =   1920
            TabIndex        =   27
            Text            =   "NPCs.htm"
            Top             =   240
            Width           =   1695
         End
         Begin VB.Frame Frame3 
            Caption         =   "HTML Code"
            Height          =   3135
            Index           =   0
            Left            =   120
            TabIndex        =   23
            Top             =   480
            Width           =   7815
            Begin RichTextLib.RichTextBox txtHTML2 
               Height          =   2415
               Index           =   0
               Left            =   120
               TabIndex        =   70
               Top             =   240
               Width           =   7575
               _ExtentX        =   13361
               _ExtentY        =   4260
               _Version        =   393217
               Enabled         =   -1  'True
               ScrollBars      =   2
               TextRTF         =   $"frmMain.frx":0340
            End
            Begin VB.CommandButton Command3 
               Caption         =   "Save"
               Height          =   255
               Index           =   0
               Left            =   6480
               TabIndex        =   29
               Top             =   2760
               Width           =   1215
            End
            Begin VB.CommandButton Command2 
               Caption         =   "Preview"
               Height          =   255
               Index           =   0
               Left            =   5280
               TabIndex        =   28
               Top             =   2760
               Width           =   1215
            End
            Begin VB.CommandButton Command4 
               Caption         =   "Create Table"
               Height          =   255
               Index           =   0
               Left            =   4080
               TabIndex        =   24
               Top             =   2760
               Width           =   1215
            End
            Begin VB.Label Label11 
               AutoSize        =   -1  'True
               BackStyle       =   0  'Transparent
               Caption         =   "Hit Ctrl+A To Select All"
               Height          =   195
               Index           =   0
               Left            =   120
               TabIndex        =   25
               Top             =   2760
               Width           =   1605
            End
         End
         Begin VB.Label Label3 
            AutoSize        =   -1  'True
            BackStyle       =   0  'Transparent
            Caption         =   "Filename With Extension:"
            Height          =   195
            Index           =   0
            Left            =   120
            TabIndex        =   26
            Top             =   240
            Width           =   1785
         End
      End
   End
   Begin VB.Frame Frame5 
      Caption         =   "Configuration"
      Height          =   1455
      Left            =   120
      TabIndex        =   5
      Top             =   120
      Width           =   8295
      Begin VB.CommandButton Command1 
         Caption         =   "Default"
         Height          =   255
         Left            =   6960
         TabIndex        =   56
         Top             =   720
         Width           =   1215
      End
      Begin VB.CommandButton Command5 
         Caption         =   "Save Config"
         Height          =   255
         Left            =   6960
         TabIndex        =   20
         Top             =   480
         Width           =   1215
      End
      Begin VB.TextBox txtBGColor 
         Height          =   285
         Left            =   120
         MaxLength       =   7
         TabIndex        =   15
         Text            =   "#FFFFFF"
         Top             =   1080
         Width           =   1575
      End
      Begin VB.TextBox txtColor 
         Height          =   285
         Left            =   5280
         MaxLength       =   7
         TabIndex        =   13
         Text            =   "#000000"
         Top             =   480
         Width           =   1575
      End
      Begin VB.TextBox txtSize 
         Height          =   285
         Left            =   4440
         MaxLength       =   3
         TabIndex        =   12
         Text            =   "10"
         Top             =   480
         Width           =   735
      End
      Begin VB.TextBox txtFont 
         Height          =   285
         Left            =   2640
         TabIndex        =   11
         Text            =   "Verdana"
         Top             =   480
         Width           =   1695
      End
      Begin VB.TextBox txtTitle 
         Height          =   285
         Left            =   120
         TabIndex        =   7
         Text            =   "NPC Database"
         Top             =   480
         Width           =   2415
      End
      Begin VB.Label Label12 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Item/NPC Picture:"
         Height          =   195
         Left            =   5040
         TabIndex        =   67
         Top             =   840
         Width           =   1290
      End
      Begin VB.Label Label8 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Background Color:"
         Height          =   195
         Left            =   120
         TabIndex        =   14
         Top             =   840
         Width           =   1320
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Font Size:"
         Height          =   195
         Left            =   4440
         TabIndex        =   10
         Top             =   240
         Width           =   705
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Text Color:"
         Height          =   195
         Left            =   5280
         TabIndex        =   9
         Top             =   240
         Width           =   765
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Font:"
         Height          =   195
         Left            =   2640
         TabIndex        =   8
         Top             =   240
         Width           =   360
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Page Title:"
         Height          =   195
         Left            =   120
         TabIndex        =   6
         Top             =   240
         Width           =   765
      End
   End
   Begin VB.Frame Frame4 
      Caption         =   "Table Properties"
      Height          =   975
      Left            =   120
      TabIndex        =   0
      Top             =   1680
      Width           =   8295
      Begin VB.TextBox txtWidth 
         Height          =   285
         Left            =   6240
         MaxLength       =   7
         TabIndex        =   18
         Text            =   "500"
         Top             =   480
         Width           =   1935
      End
      Begin VB.TextBox txtBC 
         Height          =   285
         Left            =   4200
         MaxLength       =   7
         TabIndex        =   17
         Text            =   "#C0C0C0"
         Top             =   480
         Width           =   1935
      End
      Begin VB.TextBox txtDBC 
         Height          =   285
         Left            =   2160
         MaxLength       =   7
         TabIndex        =   4
         Text            =   "#FFFFFF"
         Top             =   480
         Width           =   1935
      End
      Begin VB.TextBox txtMBC 
         Height          =   285
         Left            =   120
         MaxLength       =   7
         TabIndex        =   2
         Text            =   "#F2F2F2"
         Top             =   480
         Width           =   1935
      End
      Begin VB.Label Label10 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Width:"
         Height          =   195
         Left            =   6240
         TabIndex        =   19
         Top             =   240
         Width           =   465
      End
      Begin VB.Label Label9 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Border Color:"
         Height          =   195
         Left            =   4200
         TabIndex        =   16
         Top             =   240
         Width           =   915
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Data Background Color:"
         Height          =   195
         Left            =   2160
         TabIndex        =   3
         Top             =   240
         Width           =   1710
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Main Background Color:"
         Height          =   195
         Left            =   120
         TabIndex        =   1
         Top             =   240
         Width           =   1710
      End
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub chkItemPicture_Click()
    If chkItemPicture.Value = Checked Then
        If FileExist(App.Path & "\items.bmp") = False Then
            MsgBox "Please make sure items.bmp is in this folder!"
            chkItemPicture.Value = Unchecked
        End If
    End If
End Sub

Private Sub chkLocation_Click()
    If chkLocation.Value = Checked Then
        chkMapNum.Enabled = True
        MsgBox "Warning: Depending on your max Maps and Shops, this may take a while to create the code!"
    Else
        chkMapNum.Enabled = False
    End If
End Sub

Private Sub chkNPCPicture_Click()
    If chkNPCPicture.Value = Checked Then
        If FileExist(App.Path & "\sprites.bmp") = False Then
            MsgBox "Please make sure sprites.bmp is in this folder!"
            chkNPCPicture.Value = Unchecked
        End If
    End If
    
    If chkNPCPicture.Value = Checked Then
        If FileExist(App.Path & "\bigsprites.bmp") = False Then
            MsgBox "Please make sure bigsprites.bmp is in this folder!"
            chkNPCPicture.Value = Unchecked
        End If
    End If
End Sub

Private Sub Command1_Click()
Dim FileName As String, i As Long
    
    FileName = App.Path & "\DBConfig.ini"
    frmMain.txtTitle.Text = GetVar(FileName, "CONFIG", "PageTitle")
    frmMain.txtFont.Text = GetVar(FileName, "CONFIG", "Font")
    frmMain.txtSize.Text = GetVar(FileName, "CONFIG", "FontSize")
    frmMain.txtColor.Text = GetVar(FileName, "CONFIG", "FontColor")
    frmMain.txtBGColor.Text = GetVar(FileName, "CONFIG", "Background")
    frmMain.txtMBC.Text = GetVar(FileName, "CONFIG", "TableMBColor")
    frmMain.txtDBC.Text = GetVar(FileName, "CONFIG", "TableDBColor")
    frmMain.txtBC.Text = GetVar(FileName, "CONFIG", "TableBorderColor")
    frmMain.txtWidth.Text = GetVar(FileName, "CONFIG", "TableWidth")
End Sub

Private Sub Command2_Click(Index As Integer)
Dim FileName As String
    If Index = 0 Then
        FileName = App.Path & "\HTML Docs\" & Trim(txtFileName(0).Text)
        If FileExist(FileName) = True Then
            frmPreview.Show vbModeless
            frmPreview.WebBrowser.Navigate FileName
        Else
            MsgBox "Please make sure " & Trim(txtFileName(0).Text) & " is saved in the Table Creator's directory!"
        End If
    ElseIf Index = 1 Then
        FileName = App.Path & "\HTML Docs\" & Trim(txtFileName(1).Text)
        If FileExist(FileName) = True Then
            frmPreview.Show vbModeless
            frmPreview.WebBrowser.Navigate FileName
        Else
            MsgBox "Please make sure " & Trim(txtFileName(1).Text) & " is saved in the Table Creator's directory!"
        End If
    ElseIf Index = 2 Then
        FileName = App.Path & "\HTML Docs\" & Trim(txtFileName(2).Text)
        If FileExist(FileName) = True Then
            frmPreview.Show vbModeless
            frmPreview.WebBrowser.Navigate FileName
        Else
            MsgBox "Please make sure " & Trim(txtFileName(2).Text) & " is saved in the Table Creator's directory!"
        End If
    Else
        FileName = App.Path & "\HTML Docs\" & Trim(txtFileName(3).Text)
        If FileExist(FileName) = True Then
            frmPreview.Show vbModeless
            frmPreview.WebBrowser.Navigate FileName
        Else
            MsgBox "Please make sure " & Trim(txtFileName(3).Text) & " is saved in the Table Creator's directory!"
        End If
    End If
End Sub

Private Sub Command3_Click(Index As Integer)
    If Index = 0 Then
        If FileExist(App.Path & "\HTML Docs\" & Trim(txtFileName(0).Text)) = True Then
            Kill App.Path & "\HTML Docs\" & Trim(txtFileName(0).Text)
        End If
        SetStatus "Saving " & Trim(txtFileName(0).Text) & "..."
        SaveFile Trim(txtFileName(0).Text), 0
        SetStatus "Saved!"
    ElseIf Index = 1 Then
        If FileExist(App.Path & "\HTML Docs\" & Trim(txtFileName(1).Text)) = True Then
            Kill App.Path & "\HTML Docs\" & Trim(txtFileName(1).Text)
        End If
        SetStatus "Saving " & Trim(txtFileName(1).Text) & "..."
        SaveFile Trim(txtFileName(1).Text), 1
        SetStatus "Saved!"
    ElseIf Index = 2 Then
        If FileExist(App.Path & "\HTML Docs\" & Trim(txtFileName(2).Text)) = True Then
            Kill App.Path & "\HTML Docs\" & Trim(txtFileName(2).Text)
        End If
        SetStatus "Saving " & Trim(txtFileName(2).Text) & "..."
        SaveFile Trim(txtFileName(2).Text), 2
        SetStatus "Saved!"
    Else
        If FileExist(App.Path & "\HTML Docs\" & Trim(txtFileName(3).Text)) = True Then
            Kill App.Path & "\HTML Docs\" & Trim(txtFileName(3).Text)
        End If
        SetStatus "Saving " & Trim(txtFileName(3).Text) & "..."
        SaveFile Trim(txtFileName(3).Text), 3
        SetStatus "Saved!"
    End If
End Sub

Private Sub Command4_Click(Index As Integer)
    If Index = 0 Then
        CreateNPCDatabase
    ElseIf Index = 1 Then
        CreateItemDatabase
    ElseIf Index = 2 Then
        CreateShopDatabase
    Else
    
    End If
End Sub

Private Sub Command5_Click()
Dim FileName As String
    
    FileName = App.Path & "\DBConfig.ini"
    PutVar FileName, "CONFIG", "PageTitle", Trim(txtTitle.Text)
    PutVar FileName, "CONFIG", "Font", Trim(txtFont.Text)
    PutVar FileName, "CONFIG", "FontSize", Trim(txtSize.Text)
    PutVar FileName, "CONFIG", "FontColor", Trim(txtColor.Text)
    PutVar FileName, "CONFIG", "Background", Trim(txtBGColor.Text)
    PutVar FileName, "CONFIG", "TableMBColor", Trim(txtMBC.Text)
    PutVar FileName, "CONFIG", "TableDBColor", Trim(txtDBC.Text)
    PutVar FileName, "CONFIG", "TableBorderColor", Trim(txtBC.Text)
    PutVar FileName, "CONFIG", "TableWidth", Trim(txtWidth.Text)
End Sub

Private Sub Form_KeyPress(KeyAscii As Integer)
Const ASC_CTRL_A As Integer = 1

Dim txt As TextBox

    ' See if this is Ctrl-A.
    If KeyAscii = ASC_CTRL_A Then
        ' The user is pressing Ctrl-A. See if the
        ' active control is a TextBox.
        If TypeOf ActiveControl Is TextBox Then
            ' Select the text in this control.
            Set txt = ActiveControl
            txt.SelStart = 0
            txt.SelLength = Len(txt.Text)
        End If
    End If
End Sub

Private Sub Form_Load()
    KeyPreview = True
End Sub

